<script lang="ts">
    import type { EmptyOptionProps } from "./Select";

    const props: EmptyOptionProps = $props();
    const value = props.data.value;

    const classList = $derived({
        "cm-select-option": true,
        "cm-select-option-active": props.checked,
    });
</script>

<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
<li class={classList} style={props.style} onclick={() => props.onclick?.(value)}>
    {props.data.label}
</li>
